home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / PowerPlant / 3D Additions 1.7 / 3D Additions / 3DUtilities.h < prev    next >
Encoding:
Text File  |  1995-10-09  |  3.9 KB  |  108 lines  |  [TEXT/CWIE]

  1. // ===========================================================================
  2. // 3DUtilities.h      ©1995 J. Rodden, DD/MF & Associates. All rights reserved
  3. // ===========================================================================
  4. // Utilities for drawing 3D effects.
  5. //
  6. // This is intended to look and act as much like a Toolbox Manager as possible.
  7. // You should use the first set of procedures in general, but the second set 
  8. // is directly available for flexibility.
  9. //
  10. // This source code is loosely based on and heavily inspired by source code
  11. // by James W. Osborne, copyright (c) 1993, Apple Computer.
  12.  
  13. #pragma once
  14.  
  15. #include <3DGrays.h>
  16.  
  17. // ===========================================================================
  18. // These wrapper functions provide the basic 3D appearance recommended in
  19. // Develop issue 15.
  20. // ===========================================================================
  21.  
  22. void Get3DBackColor(RGBColor *outBkgndColor);
  23. void Get3DLightColor(RGBColor *outLightColor);
  24. void Get3DShadowColor(RGBColor *outShadowColor);
  25. void Get3DPenState(PenState *outPnState);
  26.  
  27. void Set3DBackColor(const RGBColor *inBkgndColor);
  28. void Set3DLightColor(const RGBColor *inLightColor);
  29. void Set3DShadowColor(const RGBColor *inShadowColor);
  30. void Set3DPenState(const PenState *inPnState);
  31.  
  32. void Draw3DInsetOvalPanel(const Rect *inRect);
  33. void Draw3DRaisedOvalPanel(const Rect *inRect);
  34.  
  35. void Draw3DInsetOvalBorder(const Rect *inRect);
  36. void Draw3DRaisedOvalBorder(const Rect *inRect);
  37.  
  38. void Draw3DInsetOvalFrame(const Rect *inRect);
  39. void Draw3DRaisedOvalFrame(const Rect *inRect);
  40.  
  41. void Draw3DInsetPanel(const Rect *inRect);
  42. void Draw3DRaisedPanel(const Rect *inRect);
  43.  
  44. void Draw3DInsetBorder(const Rect *inRect);
  45. void Draw3DRaisedBorder(const Rect *inRect);
  46.  
  47. void Draw3DInsetFrame(const Rect *inRect);
  48. void Draw3DRaisedFrame(const Rect *inRect);
  49.  
  50. void Draw3DInsetHLine(short vpos, short h1, short h2);
  51. void Draw3DInsetVLine(short hpos, short v1, short v2);
  52.  
  53. void Draw3DRaisedHLine(short vpos, short h1, short h2);
  54. void Draw3DRaisedVLine(short hpos, short v1, short v2);
  55.  
  56.  
  57. // ===========================================================================
  58. // These are the functions that actually do the work, use these to customize
  59. // color usage. For inset effects, use dark color for inULColor and light color
  60. // for inLRColor. Reverse colors for raised appearance.
  61. // ===========================================================================
  62.  
  63. void Draw3DOvalPanel(const Rect *inRect, const RGBColor *inBKColor,
  64.                      const RGBColor *inULColor, const RGBColor *inLRColor,
  65.                      const Boolean inFrameIt);
  66.  
  67. void Draw3DOvalBorder(const Rect *inRect, const RGBColor *inULColor,
  68.                       const RGBColor *inLRColor, const Boolean inFrameIt);
  69.  
  70. void Draw3DOvalFrame(const Rect *inRect, const RGBColor *inULColor,
  71.                      const RGBColor *inLRColor);
  72.  
  73. void Draw3DPanel(const Rect *inRect, const RGBColor *inBKColor,
  74.                  const RGBColor *inULColor,  const RGBColor *inLRColor,
  75.                  const Boolean inFrameIt);
  76.  
  77. void Draw3DBorder(const Rect *inRect, const RGBColor *inULColor,
  78.                   const RGBColor *inLRColor, const Boolean inFrameIt);
  79.  
  80. void Draw3DFrame(const Rect *inRect, const RGBColor *inULColor,
  81.                  const RGBColor *inLRColor);
  82.  
  83. void Draw3DHLine(short vpos, short h1, short h2,
  84.                  const RGBColor *inULColor, const RGBColor *inLRColor);
  85.                      
  86. void Draw3DVLine(short hpos, short v1, short v2,
  87.                  const RGBColor *inULColor, const RGBColor *inLRColor);
  88.  
  89. void DrawCLine(const RGBColor *inColor, short h1, short v1, short h2, short v2);
  90. void CLineTo(const RGBColor *theColor, short h, short v);
  91.  
  92. void BWShadowInset(const Rect* inRect);
  93. void BWShadowRaised(const Rect* inRect);
  94. void BWShadowLine( short h1, short v1, short h2, short v2);
  95.  
  96. // ===========================================================================
  97. // Provide backward compatability (ONLY) with early releases of this package.
  98.  
  99. #define DrawH3DLine        Draw3DHLine
  100. #define DrawV3DLine        Draw3DVLine
  101.  
  102. // ===========================================================================
  103.  
  104.  
  105.  
  106.  
  107.  
  108.